import Router from "@koa/router";
import {
  getQuestionList,
  postQuestion,
  putQuestion,
  deleteQuestionById,
  batchDelete,
} from "../controller/question.js";
import { aiGenerate } from "../controller/ai.js";
// import { getUsers, postUser } from "../controller/index.js";

const router = new Router({
  prefix: "/api",
});

// 题库相关
router.get("/questions", getQuestionList);
router.post("/questions", postQuestion);
router.put("/questions/:id", putQuestion);
router.delete("/questions/:id", deleteQuestionById);
router.post("/questions/batch-delete", batchDelete);

// AI出题
router.post("/ai-generate", aiGenerate);

export default router;